<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />

<!DOCTYPE html>
<html>
<head>
<meta property="wb:webmaster" content="92c3223ac5952280" />
<meta property="qc:admins" content="60142616551641621776375" />
<meta http-equiv="Content-Type" content="application/json;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>YAMI</title>
<link rel="shortcut icon" type="image/x-icon"
	href="${ctx}/assets/img/favicon.ico">

<c:if test="${env == 'production' }">
	<link href="${ctx}/assets/css/bootstrap.min.css?v=${version}"
		rel="stylesheet" />
	<link href="${ctx}/assets/css/default.min.css?v=${version}"
		type="text/css" rel="stylesheet" />
		<link href="${ctx}/assets/sea-modules/jquery/jquery-jbox/2.3/Skins2/Yellow/jbox.css?v=${version}" type="text/css" rel="stylesheet" />
</c:if>

<c:if test="${env != 'production' }">
	<link href="${ctx}/assets/css/bootstrap.css?v=${version}"
		type="text/css" rel="stylesheet" />
	<link href="${ctx}/assets/css/default.css?v=${version}" type="text/css"
		rel="stylesheet" />
		<link href="${ctx}/assets/sea-modules/jquery/jquery-jbox/2.3/Skins2/Yellow/jbox.css?v=${version}" type="text/css" rel="stylesheet" />
</c:if>

<link href="${ctx}/assets/css/bootstrap-select.min.css?v=${version}"
	rel="stylesheet" />
<link href="${ctx}/assets/css/bootstrap-responsive.min.css?v=${version}"
	rel="stylesheet">
<link href="${ctx}/assets/css/validate.min.css?v=${version}"
	rel="stylesheet">


<script src="${ctx}/assets/sea-modules/seajs/seajs/2.1.1/sea.js"></script>
<script>
	seajs.config({
		base : "${ctx}/assets/sea-modules/",
		map : [ [ /^(.*\.(?:js))(.*)$/i, '$1?v=${version}' ] ],
		paths : {
			"echarts" : "echarts/1.2.1",
			"zrender" : "zrender/1.0.4"
		},
		alias : {
			"jquery" : "jquery/jquery/1.10.1/jquery",
			"jquery-migrate" : "jquery/jquery/1.10.1/jquery-migrate.js",
			"echarts" : "echarts/echarts",
			"zrender" : "zrender/zrender",
			"jbox" : "jquery/jquery-jbox/2.3/jquery.jBox-2.3.min",
		}
	});

	$CONFIG = {
		base_url : '${ctx}',
		version : '${version}',
		admin_url:'${admin_url}',
		env:'${env}'
	};

	$g_user = {
		id : '<shiro:principal property="id"/>',
		name : '<shiro:principal property="name"/>',
		login : '<shiro:guest>false</shiro:guest><shiro:user>true</shiro:user>',
		role : '<shiro:principal property="roles"/>',
		avatarUrl : '<shiro:principal property="avatarUrl"/>',
	};
</script>
</head>
<body>

	<!-- Container begin -->
	<tiles:insertAttribute name="header" />
	<tiles:insertAttribute name="sub-header" />
	<div class="main row-fluid">
		<tiles:insertAttribute name="l-content" />
		<tiles:insertAttribute name="r-content" />
	</div>
	<!-- /container -->
	<tiles:insertAttribute name="footer" />


	<c:if test="${env == 'production' }">
		<script type="text/javascript">
			seajs
					.use("${ctx}/assets/sea-modules/bootstrap/bootstrap/2.3.0/bootstrap.min");
			seajs.use("${ctx}/assets/js-dist/menu");
		</script>
	</c:if>
	<c:if test="${env != 'production' }">
		<script type="text/javascript">
			seajs
					.use("${ctx}/assets/sea-modules/bootstrap/bootstrap/2.3.0/bootstrap.min");
			seajs.use("${ctx}/assets/js/menu");
		</script>
	</c:if>
</body>
</html>
